package com.eestimate.domain.impl;

import com.eestimate.dao.database.DBObject;
import com.eestimate.domain.ToolsAndConsumable;
import com.eestimate.domain.business.BusinessObjectImpl;
import com.eestimate.domain.business.common.BusinessObjectTypeEnum;
import com.eestimate.domain.business.common.annotations.PersistentBusinessObject;
import com.eestimate.domain.business.common.annotations.PersistentMetadata;
import com.eestimate.valuesobjects.BaseDTO;
import com.eestimate.valuesobjects.ToolsConsumablesVo;

@PersistentBusinessObject(type=BusinessObjectTypeEnum.TOOLSANDCONSUMABLES)
public class ToolsAndConsumableImpl extends BusinessObjectImpl implements ToolsAndConsumable {

	public ToolsAndConsumableImpl(DBObject dbObject) {
		super(dbObject);
		// TODO Auto-generated constructor stub
	}

	@PersistentMetadata
	private String application;
	
	@PersistentMetadata
	private String description;
	
	@PersistentMetadata
	private String brand;
	
	@PersistentMetadata
	private String model;
	
	@PersistentMetadata
	private String origin;
	
	@PersistentMetadata
	private String packing;
	
	@PersistentMetadata
	private String companyUuid;
	
	@Override
	public String getApplication() {
		return application;
	}

	@Override
	public void setApplication(String application) {
		this.application = application;
	}

	@Override
	public String getDescription() {
		return description;
	}

	@Override
	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public String getBrand() {
		return brand;
	}

	@Override
	public void setBrand(String brand) {
		this.brand = brand;
	}

	@Override
	public String getModel() {
		return model;
	}

	@Override
	public void setModel(String model) {
		this.model = model;
	}

	@Override
	public String getOrigin() {
		return origin;
	}

	@Override
	public void setOrigin(String origin) {
		this.origin = origin;
	}

	@Override
	public String getPacking() {
		return packing;
	}

	@Override
	public void setPacking(String packing) {
		this.packing = packing;
	}
	
	@Override
	public String getCompanyUuid() {
		return companyUuid;
	}

	@Override
	public void setCompanyUuid(String companyUuid) {
		this.companyUuid = companyUuid;
	}

	@Override
	public BaseDTO createDTO(){
		ToolsConsumablesVo vo = new ToolsConsumablesVo();
		vo.name				= this.getName();
		vo.type 			= this.getType();
		vo.uuid				= this.getUuid();
		
		vo.application 		= this.application;
		vo.description		= this.description;
		vo.brand			= this.brand;
		vo.model			= this.model;
		vo.origin			= this.origin;
		vo.packing			= this.packing;
		
		return vo;
	}
}